A treetable for display of hierarchical data. Furthermore the table has some built in features to render icons, dates, comboboxes, Change color of foreground and background of the table cells etc.
Anchor | Integer: default value: [] | Returns the index (row and column) of the first selected cell in the current selection. Some interfaces display the anchor in a special way. e.g. Windows95 displays the lead index with a dotted yellow outline. |
BackgroundColor | 1-by-3 matrix of RGB values, default value is system dependent | The background color of the treetable. |
Border | Boolean, default value: true | Indicates if a border is shown around the treetable's scrollpane. |
Busy | Boolean, default value: False | If true a indeterminate progress indicator appears on the faded treetable. While this indicator is visible the treetable is disabled. |
BusyAction | cancel | {queue} | Callback queuing. Determines how MATLAB handles the execution of interrupting callbacks. A running callback is the currently executing callback. The interrupting callback is the callback that tries to interrupt the running callback. The BusyAction property of the interrupting callback determines how MATLAB handles its execution. When the BusyAction property is set to: 'queue' ? Puts the interrupting callback in a queue to be processed after the running callback finishes execution. 'cancel' ? Discards the interrupting callback as MATLAB finishes execution. For information about how the Interruptible property of the callback controls whether other callbacks can interrupt the running callback, see the Interruptible property description. |
Callback | String, cell array or function handle, default value: [] | Function that should be executed when the user changes the current selection. Selection can be changed by clicking with the left mousebutton or by using up/down/left/right, enter, tab, pageUp/PageDown, Ctrl+a or home/end keys |
CellBackgroundColor | Matrix, default value: [] | Specifies an index in the ColorSet for every treetable cell. This matrix with indices has the same size (rows and columns) as the data in the treetable. The colorindex is used to look up the color in the treetable's ColorSet and sets every cell's background color. e.g. ColorSet = [0 0 0 1; 0 --> blue 1 1 0 0] 1 --> red and Colorindex = [1 1 1;0 0 0] makes the first row red and the second row blue NOTE: Do not forget to specify the treetable's ColorSet |
CellForegroundColor | Matrix, default value: [] | Specifies an index in the ColorSet for every treetable cell. This matrix with indices has the same size (rows and columns) as the data in the treetable. The colorindex is used to look up the color in the treetable's ColorSet and sets every cell's foreground (text) color if possible. e.g. ColorSet = [0 0 0 1; 0 --> blue 1 1 0 0] 1 --> red and Colorindex = [1 1 1;0 0 0] makes the text of the first row red and the second row blue NOTE: Do not forget to specify the treetable's ColorSet. |
CellSelection | Boolean: default value: False | Indicates whether the user can select single cells (true) or only rows (false) in the treetable. |
CellToolTips | Cellstring, default value: {} (no tooltips) | Set the tooltips for the treetable cells. |
CheckedRows | [Nx1] Array of booleans with N the height of the data matrix | If true, check the checkbox for this row. if false, uncheck the checkbox for this row. |
Children | The component's children. | |
Clipping | clipping | Clipping mode. This property has no direct effect on the objects Use this property if you want to implement your own custom |
CMenu | Handle, default value: [] | The handle of the context menu associated with the treetable. The context menu is displayed whenever you right-click over the treetable. Use the Matlab uicontextmenu function to create the context menu. |
ColorSet | Matrix Nx4, default value: [] (no colors) | First column is a key Second, third and fourth column specify the RGB values for the corresponding index. The colorset is used to determine the color of every cell in the treetable by using the color key specified for every cell. The colorset is also used to determine the colors for piecebars (see ColumnFormats). |
ColumnClass (Read-only) | CellString with class per column. | |
ColumnControl | Boolean, default value: False | The Column Control is an icon that renders to the right of the column headers, just above the vertical scrollbar. When a user clicks the icon, a popup menu appears. This popupmenu can be defined by using the treetable's property ControlButtonMenu. |
ColumnControlVisible | Boolean, default value: False | The Column Control is an icon that renders to the right of the column headers, just above the vertical scrollbar. When a user clicks the icon, a popup menu appears. This popupmenu can be defined by using the treetable's property ControlButtonMenu. |
ColumnEditable | Vector of boolean, default value: [] (not editable) | Specifies the columns which are editable. |
ColumnFormats | Cellstring, default value: {}. | Set the format of the treetable's columns. Possible values: icon render string as icon, the icon is looked up in the iconset legend render hg handles as legend items filesize render numbers as a filesize, e.g. 1024 renders as 1 KB date use matlab datestr formatting to render a Matlab datenum as a date. e.g. 'dd mmm yyyy' renders a datenum as 01 mrt 2016 bar render numbers as a bar absbar render absolute numbers as a bar, the bars are colored red in case of negative numbers piecebar color render an rgb color triple e.g. [0 1 0] as a color number use sprintf format for numbers e.g. %g or %6.4f string render value as a string NOTE: use '' for boolean, integers |
ColumnNames | Cellstring, default value: {}. | Set the names (headers) of the treetable columns. |
ColumnTooltips | Cellstring, default value: {} (no tooltips) | Set the tooltips for the treetable columns. |
ColumnWidths | Array, default value: []. | Set the widths of the treetable's columns, -1 if auto. |
Content | ? | |
ContextMenu | Handle, default value: [] | The handle of the context menu associated with the treetable. The context menu is displayed whenever you right-click over the treetable. Use the Matlab uicontextmenu function to create the context menu. |
ControlButtonMenu | Handle, default value: [] | The handle of the menu associated with the treetable's columncontrol button in the right upper corner of the treetable. The context menu is displayed whenever you click on the columncontrol button. Menuitems are added after the standard menu of the treetable. |
Data | Cell array, default value []: | Data for the treetable, every column should have the same format e.g. all strings or numbers. |
DragEnabled | Boolean, default value: false | Specifies if the content of the selected cells/rows/columns can be dragged into another component or application. |
EditCallback | String, cell array or function handle, default value: [] | Function that should be executed when the user changes the value of a cell in the treetable. Use getTableValue to obtain information about which cell(s) of the treetable are edited |
Enable | {on} | inactive | off | Disable or enable the component. This property controls how components respond to user interaction. Possible values for this property: on ? The component is operational (the default). inactive ? The component is not operational, but looks the same as when Enable is on. off ? The component is not operational and is grayed out. |
ExpandedRows | Boolean array, default value: all false | Expansion state of every row in the treetable Note that for a node expansion to be visible, not only the node, but also its parents must be expanded true -> expand this node false -> fold this node |
Extent | Width and height are the dimensions of the rectangle. All measurements are in units specified by the Units property. | Position rectangle (read only). A four-element vector that defines the size and position of the component. It has the form: [xpos,ypos,width,height] The first two elements are always zero are the component's position on the x- and y-axis. w |
FontAngle | {normal} | italic | Setting this property to italic selects a slanted version of the component's font, when it is available on your system. |
FontName | String, default is system dependent. | The name of the font in which to display the text in the components. To display and print properly, this must be a font that your system supports. Use listfonts to list all available system fontnames. |
FontSize | Integer, default value is system dependent. | A number specifying the size in pixels of the component's font. |
FontUnits | {points} | normalized | inches | centimeters | pixels | This property determines the units used by the FontSize property. Normalized units interpret FontSize as a fraction of the height of the uicontrol. When you resize the uicontrol, MATLAB modifies the screen FontSize accordingly. pixels, inches, centimeters, and points are absolute units (1 point = 1/72 inch). |
FontWeight | {normal} | bold | Setting this property to bold selects a bold version of the component's font, when it is available on your system. |
ForegroundColor | RGB triple, default value is system dependent | The foreground color of the treetable (font color). |
Grid | {grid} | horizontal | vertical | none | Specifies whether the treetable draws horizontal lines, vertical lines, both or nothing between the treetable cells. |
GridBackgroundColor | 1-by-3 matrix of RGB values, default value is system dependent | The background color of the treetable. |
GridColor | RGB triple, default value is system dependent | The color of the treetable's (partial) grid when visible. |
HeaderBackgroundColor | RGB triple, default value is system dependent | The background color of the treetable header. |
HeaderFontAngle | {normal} | italic | Setting this property to italic selects a slanted version of the treetable header's font. |
HeaderFontName | String, default is system dependent. | The name of the font in which to display the string in the treetable header. To display and print properly, this must be a font that your system supports. Use listfonts to list all available system fontnames. |
HeaderFontSize | Integer, default value is system dependent. | A number specifying the size in pixels of the treetable header's font. |
HeaderFontWeight | {normal} | bold | Setting this property to bold selects a bold version of the treetable header's font. |
HeaderForegroundColor | RGB triple, default value is system dependent | The foreground color of the treetable (text color) . |
HeaderVisible | Boolean, default value: True | Display a header with columnnames above the treetable. |
Hierarchy | [Nx1] Array of int | This array defines the tree structure if element i == j then j is the parent of i, 0 is the root E.g. [0 0 0 0 0] --> flat treetable (no nesting) E.g. [0 1 1 1 1] --> treetable with one nest (all nodes have node 1 as their parent) E.g. [0 1 1 1 1 0 6 6 6 6] --> treetable with two nests of four nodes |
Highlighter | An RGB triple | {none} | genericgrey | beige | classicLinePrinter | floralWhite | linePrinter | quickSilver | ledger | matlab | notepad | Rows can be highlighted to make it easier to distinguish between different rows by using a subtle background color scheme for every other row. |
IconNames | [Nx1] cellstring | The cellcontent specifies the icon (from the iconset) to be shown in the hierarchical column of the treetable E.g.{'bullet_green.png';'bullet_green.png'} will render green bulleted nodes |
Iconset | String, default value: '' | The name of the jar file with icons or the full path to the jar file. |
InfoLabel | Boolean, default value: False | Specifies if a label with info is visible in the lower right corner of the treetable. This label shows information about the number of selected rows, the number of visible rows (after filtering) and the total number of available rows. |
InfoLabelFontAngle | {normal} | italic | Setting this property to italic selects a slanted version of the info label's font, when it is available on your system. |
InfoLabelFontName | String, default is system dependent. | The name of the font in which to display the string in the info label. To display and print properly, this must be a font that your system supports. Use listfonts to list all available system fontnames. |
InfoLabelFontSize | Integer, default value is system dependent. | A number specifying the size in pixels of the info label's font. |
InfoLabelFontWeight | {normal} | bold | Setting this property to bold selects a bold version of the infor label's font, when it is available on your system. |
Interruptible | off | {on} | Callback routine interruption. Controls whether MATLAB can interrupt an object's callback function when subsequent callbacks attempt to interrupt it. |
JavaHandle | Java object | The underlying java object. See javacomponent |
KeyPressedCallback | String, cell array or function handle, default value: [] | Function that should be executed when the user presses a key or combination of keys. |
MatlabHandle | Matlab handle | The handle of the associated Matlab container for this java object. See javacomponent |
MaximumSize | Array, [width height] | The component's maximum size, measured in pixels. The preferred size indicates the best size for the component. The component should be no larger than its maximum size and no smaller than its minimum size. NOTE: Matlab may overrule this setting if the component is not in a Panel, ScrollPane, Toolbar, SplitPane or TabbedPane. |
MinimumSize | Array, [width height] | The component's minimum size, measured in pixels. The preferred size indicates the best size for the component. The component should be no larger than its maximum size and no smaller than its minimum size. NOTE: Matlab may overrule this setting if the component is not in a Panel, ScrollPane, Toolbar, SplitPane or TabbedPane.rtain layout managers. |
MouseClickedCallback | String, cell array or function handle, default value: [] | Specifies the function that should be executed when the mouse is clicked on the component |
MouseEnteredCallback | String, cell array or function handle, default value: [] | Specifies the callback function that should be executed when the mouse enters the component. |
MouseExitedCallback | String, cell array or function handle, default value: [] | Specifies the callback function that should be executed when the mouse exits the component. |
NextFocusableComponent | Jacontrol, default value: [] | Specifies the next component to get the focus after this one. for example, when the tab key or shift-tab key is used. |
Parent | The component's parent. | |
Position | Array, [width height] | Size and location of the component. The rectangle defined by this property specifies the size and location of the component within the parent. Specify Position as [left bottom width height] left and bottom are the distance from the lower-left corner of the parent object to the lower-left corner of the component. width and height are the dimensions of the component. All measurements are in units specified by the Units property. |
PreferredSize | Array, [width height] | The component's preferred size, measured in pixels. The preferred size indicates the best size for the component. The component should be no larger than its maximum size and no smaller than its minimum size. NOTE: Matlab may overrule this setting if the component is not in a Panel, ScrollPane, Toolbar, SplitPane or TabbedPane. |
Prompt | String, default value: '' | The prompt text (shown empty hint) for the treetable |
RowCheckedCallback | String, cell array or function handle, default value: [] | Function that executes when the user clicks on the checkboxes in the tree |
Scrollbar | Boolean, default value: False | Normally a treetable in a scrollPane will fit all columns within the scrollpane's viewport, possibly causing some of them to resize beneath an optimal width and making them illegible. By setting the Scrollbar property to true all columns will be resized to their preferred width, possibly extending the treetable outside the scrollpane's viewport. |
SelectedColumns | Integer: default value: [] | A vector of indices corresponding to the currently selected treetable columns. 1 corresponds to the first column in the treetable. Note that the index refers to the raw data and not to the current view of the table |
SelectedRows | Integer: default value: [] | A vector of indices corresponding to the currently selected treetable rows. 1 corresponds to the first row in the treetable. Note that the index refers to the raw data and not to the current view of the table |
SelectionCallback | String, cell array or function handle, default value: [] | Function that should be executed when the user changes the current selection. Selection can be changed by clicking with the left mousebutton or by using up/down/left/right, enter, tab, pageUp/PageDown, Ctrl+a or home/end keys The number of clicks can be determined from the callback event by using get(event, 'clickcount') |
SelectionMode | {1} | 2 | 3 | 5 | 6 | 7 | 11 | The selection mode. The following selectionMode values are allowed: 1: SINGLE_SELECTION Only one list index can be selected at a time. 2: SINGLE_INTERVAL_SELECTION One contiguous index interval can be selected at a time. 3: MULTIPLE_INTERVAL_SELECTION In this mode, there's no restriction on what can be selected. 5: SINGLE_SELECTION_TOGGLE Only one list index can be selected at a time. Mouse toggles selection. 6: SINGLE_INTERVAL_SELECTION_TOGGLE One contiguous index interval can be selected at a time. Mouse toggles selection. 7: MULTIPLE_INTERVAL_SELECTION_TOGGLE In this mode, there's no restriction on what can be selected. Mouse toggles selection. 11: SINGLE_SELECTION_INTERVAL Only one list index can be selected at a time. All rows in the treetable above the selected row are painted (not selected) with the selection color |
ShowCheckboxes | Boolean, default value: false | If true, show checkbox in the hierarchical column of the treetable. Use RowCheckedCallback to react on clicks on these checkboxes |
ShowRoot | Boolean, default value false | If true show root of treetable |
Style | TreeTable (Read only) | |
Tag | String, default value: '' | User specified object identifier. Use this tag i.c.w. gcjh('tag',parent) to find a modelit.ui.Jacontrol |
Type | Read only property fixed to 'Jacontrol' | String with the object type. |
Units | {pixels} | normalized | inches | centimeters | points | characters | Used to interpret the extent and position properties. All units are measured from the lower-left corner of the parent object. Normalized units map the lower-left corner of the parent object to (0,0) and the upper-right corner to (1.0,1.0). pixels, inches, centimeters, and points are absolute units (1 point = 1/72 inch). Character units are characters using the default system font; the width of one character is the width of the letter x, the height of one character is the distance between the baselines of two lines of text. If you change the value of Units, it is good practice to return it to its default value after completing your computation so as not to affect other functions that assume Units is set to the default value. |
Userdata | Array, default value: [] | User specified data for this modelit.ui.Jacontrol object |
Value | Integer: default value: [] | A a vector of indices corresponding to the currently selected treetable rows. 1 corresponds to the first row in the treetable. Note that the index refers to the raw data and not to the current view of the table |
Visible | Off | {On} | Component visibility. By default, all jacontrols are visible. When set to off, the jacontrol is not visible, but still exists and you can query and set its properties. |
Reset object fields to empty values, called by the destructor.
cleanup(obj)
obj | any | modelit.ui.Jacontrol |
No output
modelit.ui.TreeTable constructor
obj = modelit.ui.TreeTable(parent, varargin)
parent | any | handle of the TreeTable's parent e.g. gcf or modelit.ui.Panel |
varargin | any | parameter-value pairs, see TreeTable properties for a description of the parameters and their values Documentation for modelit.ui.TreeTable/TreeTable doc modelit.ui.TreeTable |
Expand or collapse entire tree
expandAll(obj, expand)
obj | any | modelit.ui.Table |
expand | any | boolean (optional), {true}: completely expand tree false: collapse tree |
No direct output, tree is fully collapsed or expanded
Programmatically set a value in the table.
setValueAt(obj, row, col, value)
obj | any | modelit.ui.Table |
row | any | integer with the row in the data model which has to be changed. |
col | any | integer with the column in the data model which has to be changed. |
value | any | the new value. |
No direct output the value in cell (row, col) of the data model is adjusted.
Get a value in the table.
value = getValueAt(obj, row, col)
obj | any | modelit.ui.Table |
row | any | integer with the row in the data model which has to be changed. |
col | any | integer with the column in the data model which has to be changed. |
value | any | the new value. |
modelit.ui.Jacontrol destructor.
delete(obj)
obj | any | modelit.ui.Jacontrol |
No output Help for modelit.ui.TreeTable/delete is inherited from superclass MODELIT.UI.JACONTROL
True if application defined data exists.
value = isappdata(obj, name)
obj | any | a modelit.ui.Jacontrol object |
name | any | string with the name of the application data |
value | any | True if the application defined data exists Help for modelit.ui.TreeTable/isappdata is inherited from superclass MODELIT.UI.JACONTROL |
Get application defined data.
value = getappdata(obj, name)
obj | any | a modelit.ui.Jacontrol object |
name | any | string with the name of the application data |
value | any | The application defined data Help for modelit.ui.TreeTable/getappdata is inherited from superclass MODELIT.UI.JACONTROL |
Set application defined data.
setappdata(obj, name, value)
obj | any | a modelit.ui.Jacontrol object |
name | any | string with the name of the application data |
value | any | value to be stored. May be anything |
No output. The application-defined data, which is created if it does not already exist, is assigned a name and a value. Help for modelit.ui.TreeTable/setappdata is inherited from superclass MODELIT.UI.JACONTROL
Returns true if this is a valid graphics object
value = ishandle(obj)
obj | any | a modelit.ui.Jacontrol object |
value | any | boolean: true if this is a valid graphics object What does "valid" mean in this context?? Matlab HG object/container that holds still exist? Help for modelit.ui.TreeTable/ishandle is inherited from superclass MODELIT.UI.JACONTROL |
Returns the underlying Java object
jobj = java(obj)
obj | any | a modelit.ui.Jacontrol object |
jobj | any | java object Help for modelit.ui.TreeTable/java is inherited from superclass MODELIT.UI.JACONTROL |
Returns the handle of the component's Matlab container
h = handle(obj)
obj | any | a modelit.ui.Jacontrol object |
h | any | handle of the component's Matlab container Help for modelit.ui.TreeTable/handle is inherited from superclass MODELIT.UI.JACONTROL |
Returns the handle of the closest ancestor of obj that matches one of the types in type,
p = ancestor(obj, type)
obj | any | modelit.ui.Jacontrol |
type | any | String or cell array of strings (types) |
p | any | handle of the closest ancestor of the obj that matches one of the types in type Help for modelit.ui.TreeTable/ancestor is inherited from superclass MODELIT.UI.JACONTROL |
Create a default object for heterogeneous arrays. Help for modelit.ui.TreeTable.getDefaultScalarElement is inherited from superclass MODELIT.UI.ABSTRACTJACONTROL
Not equal relation for handles. Help for modelit.ui.TreeTable/ne is inherited from superclass MODELIT.UI.ABSTRACTJACONTROL
Equal relation for handles. Help for modelit.ui.TreeTable/eq is inherited from superclass MODELIT.UI.ABSTRACTJACONTROL
Returns the objects whose property values match those passed as param-value pairs to the findobj command. Help for modelit.ui.TreeTable/findobj is inherited from superclass MODELIT.UI.ABSTRACTJACONTROL
Set object properties Help for modelit.ui.TreeTable/set is inherited from superclass MODELIT.UI.ABSTRACTJACONTROL